package pers.wz.controller;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pers.wz.service.ResumeService;

@RestController
@RequestMapping("/autodeliver")
@RefreshScope
public class AutoDeliverController {


    @Reference
    private ResumeService resumeService;

    @Value("${message}")
    private String message;

    @GetMapping("/getConfig")
    public String testconfig() {

        return message;
    }


    @GetMapping("/dubbotest/{userId}")
    public Integer dubboTest(@PathVariable Long userId) {
        return resumeService.findDefaultResumeByUserId(userId);

    }
}
